class CurriculodadosController < ApplicationController
  
  def initialize
    @turnos = Turno.find :all
    
  end

  # GET /curriculodados
  # GET /curriculodados.xml
  def index
    @curriculodados = Curriculodado.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @curriculodados }
    end
  end

  # GET /curriculodados/1
  # GET /curriculodados/1.xml
  def show
    @curriculodado = Curriculodado.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @curriculodado }
    end
  end

  # GET /curriculodados/new
  # GET /curriculodados/new.xml
  def new
    @curriculodado = Curriculodado.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @curriculodado }
    end
  end

  # GET /curriculodados/1/edit
  def edit
    @curriculodado = Curriculodado.find(params[:id])
  end

  # POST /curriculodados
  # POST /curriculodados.xml
  def create
    @curriculodado = Curriculodado.new(params[:curriculodado])

    respond_to do |format|
      if @curriculodado.save
        flash[:notice] = 'Curriculodado was successfully created.'
        format.html { redirect_to(curriculodados_url) }
        format.xml  { render :xml => @curriculodado, :status => :created, :location => @curriculodado }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @curriculodado.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /curriculodados/1
  # PUT /curriculodados/1.xml
  def update
    @curriculodado = Curriculodado.find(params[:id])

    respond_to do |format|
      if @curriculodado.update_attributes(params[:curriculodado])
        flash[:notice] = 'Curriculodado was successfully updated.'
        format.html { redirect_to(curriculodados_url) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @curriculodado.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /curriculodados/1
  # DELETE /curriculodados/1.xml
  def destroy
    @curriculodado = Curriculodado.find(params[:id])
    @curriculodado.destroy

    respond_to do |format|
      format.html { redirect_to(curriculodados_url) }
      format.xml  { head :ok }
    end
  end
end
